
#include "stdafx.h"
#include "ConstDef.h"
#include "ReloadCode.h"
#include "Logger.h"
#include "Interface.h"
#include "IoBuffer.h"

namespace ReloadUdpCall
{
	IoBuffer::IoBuffer( std::vector<byte>* _pVectorData )
		:pVectorData_(_pVectorData),beginOffset_(0),endOffset_(0),pBuffer_(NULL),bufferCapacity_(0)
	{
		if(_pVectorData)
		{
			bufferCapacity_ = _pVectorData->size();
			if(_pVectorData->size()>0)
				pBuffer_ = &(*pVectorData_)[0];
			else
				pBuffer_ = NULL;
		}
	}

	IoBuffer::~IoBuffer()
	{
		beginOffset_ = 0;
		endOffset_ = 0;
		pBuffer_ = NULL;
		bufferCapacity_ = 0;
		pVectorData_ = NULL;
	}
}
